Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change trigger requirement phases #7946

Closed

Conversation

Rahul-Kumar-prog
Copy link
Contributor

Fixes #7896

Proposed Changes

  • previously we do not verify that the trigger is not ready until the PingSource exists.
  • we Change trigger phases setup to requirement and add a new setup for DependencyDoesNotExist

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note


Docs

Copy link

knative-prow bot commented May 28, 2024

Hi @Rahul-Kumar-prog. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/test-and-release Test infrastructure, tests or release labels May 28, 2024
@Rahul-Kumar-prog
Copy link
Contributor Author

Hey @pierDipi @Cali0707, please have a look.

@Cali0707
Copy link
Member

@Rahul-Kumar-prog it looks like trigger.Get is undefined, which is why the code fails to compile...

What are you trying to do on that line? Maybe we can point you to something that will work there

@Rahul-Kumar-prog
Copy link
Contributor Author

Rahul-Kumar-prog commented May 28, 2024

@Cali0707 I am trying to retrieve data or resource associated with the triggerName.
if I get the tigger state then I make decision based on that and at the end if its not able to ready then print error with dependency does not exist.

if you have any other approach please let me know.

@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 30, 2024
Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.51%. Comparing base (2a11bb8) to head (f31ed9c).

Current head f31ed9c differs from pull request most recent head d5104e6

Please upload reports for the commit d5104e6 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7946   +/-   ##
=======================================
  Coverage   69.51%   69.51%           
=======================================
  Files         344      344           
  Lines       15999    15999           
=======================================
  Hits        11122    11122           
  Misses       4190     4190           
  Partials      687      687           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rahul-Kumar-prog the issue mentions TriggerDependencyAnnotation [1] but here we're modifying TriggerWithTLSSubscriber and TriggerWithTLSSubscriberTrustBundle

[1]

func TriggerDependencyAnnotation() *feature.Feature {

@Rahul-Kumar-prog
Copy link
Contributor Author

Rahul-Kumar-prog commented May 30, 2024

@Rahul-Kumar-prog the issue mentions TriggerDependencyAnnotation [1] but here we're modifying TriggerWithTLSSubscriber and TriggerWithTLSSubscriberTrustBundle

[1]

func TriggerDependencyAnnotation() *feature.Feature {

I see that in TriggerDependencyAnnotation does not have any setup phase Trigger.IsReady(...). there is one but that is alrady in Requirement phase so I thought that I have to change all Trigger.IsReady(...) setup phase to requirement phase.
tell what should I have to do now ?

there is broker.IsReady there in TriggerDependencyAnnotation.

Copy link

knative-prow bot commented May 30, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Rahul-Kumar-prog
Once this PR has been reviewed and has the lgtm label, please assign aliok for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Rahul-Kumar-prog
Copy link
Contributor Author

@Cali0707 can guide me how to test or reproduce this issue ?

Copy link

This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Reopen with /reopen. Mark as fresh by adding the
comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 29, 2024
@github-actions github-actions bot closed this Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release Test infrastructure, tests or release lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test that trigger is not ready before dependency exists with dependency annotation
3 participants